$('#navbar').ready(function(){
	$(".dropdown").mouseover(function() {
		var currentClass = null;
		
		var title_element = $(this).find('span');;
		var dropdown_menu_element = $(this).parent().find(".dropdown_menu");
		if (dropdown_menu_element.css('display') == 'none') currentClass = title_element.attr('class');
		dropdown_menu_element.slideDown('fast').show();
	
		title_element.addClass('item selected');

		$(this).parent().hover(function() {
		}, function(){
			dropdown_menu_element.slideUp('fast');
			if (currentClass) {
				title_element.removeClass();
				title_element.addClass(currentClass);
			}
		});
	});
});